<!DOCTYPE html>
<html lang="sp">
	<head>
            <meta charset="utf-8">
            <meta name="viewport" content="width=device-width, initial-scale=1.0">
            <title><?= $title;?></title>
            <link rel="shortcut icon" type="image/x-icon" href="<?php echo base_url(); ?>img/favicon.ico" />
            <!-- Fonts -->
            <link href='http://fonts.googleapis.com/css?family=Alef' rel='stylesheet' type='text/css'>
            <link href='http://fonts.googleapis.com/css?family=Pompiere' rel='stylesheet' type='text/css'>
            <link href='http://fonts.googleapis.com/css?family=Nova+Flat' rel='stylesheet' type='text/css'>
            <!-- Bootstrap -->
            <!--<link href="<?php echo base_url(); ?>css/bootstrap.css" rel="stylesheet">-->
            <link href="<?php echo base_url(); ?>css/bootstrap.min.css" rel="stylesheet">
            <link href="<?php echo base_url(); ?>css/bootstrap-theme.min.css" rel="stylesheet">
            <link href="<?php echo base_url(); ?>css/style.css" rel="stylesheet">
            <!-- Pines Notify -->
            <link href="<?php echo base_url(); ?>css/jquery.pnotify.default.css" rel="stylesheet" type="text/css" />
            <link href="<?php echo base_url(); ?>css/jquery.pnotify.default.icons.css" rel="stylesheet" type="text/css" />
            <link href="<?php echo base_url(); ?>css/notificadores.css" rel="stylesheet" type="text/css" />
            <!-- jQuery UI -->
            <link href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" media="all" rel="stylesheet" type="text/css" />
            <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
            <!--[if lt IE 9]>
              <script src="<?php echo base_url(); ?>/js/html5shiv.js"></script>
              <script src="<?php echo base_url(); ?>/js/respond.min.js"></script>
            <![endif]-->
	</head>
	<body>
            <!-- Fixed navbar -->
            <div class="navbar navbar-default navbar-fixed-top">
              <div class="container">
                <div class="navbar-header">
                  <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                  </button>
                  <a class="navbar-brand" href="<?php echo base_url()?>dispositivos"><img width="100px" src="<?php echo base_url(); ?>img/POSmobile.png"/></a>
                </div>
                <!-- Menu dependiendo de usuario -->
                <div class="navbar-collapse collapse">
                  <?php 
                    if (isset($menu))
                        echo $menu;
                    else {
                        $attributes = array('id' => 'login');
                        echo form_open('verifylogin',$attributes); ?>
                        <form role="form" id="login">
                            <div class="form-group pull-right">
                              <input type="text" class="" name="username" id="username" placeholder="usuario">
                              <input type="password" name="password" id="password" class="" placeholder="contraseña">
                              <button class="btn btn-primary" type="submit" value="Login"><span class="glyphicon glyphicon-log-in">&nbsp;</span>Ingresar</button>
                            </div>
                        </form>
                    <?php }?>
                </div>
              </div>
                <?php echo validation_errors(); ?>  
            </div>    <!-- /Fixed navbar -->
                  
    
            <!--Modal Encabezado pdf-->
            <div class="modal fade" id="modalPDF" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
                <div class="modal-dialog">
                    <div class="modal-content">
                        <div class="modal-header">
                             <button type="button" class="close" data-dismiss="modal" aria-hidden="true"><i class="glyphicon glyphicon-remove-circle"></i></button>
                             <h3 id="myModalLabel">Personalizar Encabezado PDF</h3>
                        </div>
                        <?php echo form_open_multipart('upload/do_upload',array('id'=>'formconf'));?>
                          <div class="modal-body">
                            <div class="row">
                                <div class="col-sm-4 well">
                                    <legend>Elegir logo</legend>
                                    <img id="logo" src="<?php echo base_url();?>img/icon.png"  width=100px />
                                    <input id="files" type="file" name="userfile" size="20"  />                    
                                </div>
                                <div class="col-sm-8  well">
                                    <legend id="nombreEmpresa">Nombre de la empresa</legend>
                                    <div id="clientes">                       
                                        <label class="checkbox">
                                            <input class="checkboxc" type="checkbox" name=campos[] id="0" value="estudios.Nombre as estudio"> Estudio
                                        </label>
                                        <label class="checkbox">
                                            <input class="checkboxc" type="checkbox" name=campos[] id="1" value="encuesta.Nombre as encuesta"> Encuesta
                                        </label>
                                        <label class="checkbox">
                                            <input class="checkboxc" type="checkbox" name=campos[] id="2" value="FechaAplicacion as aplicacion"> Fecha Aplicacion
                                        </label>   
                                         <label class="checkbox">
                                            <input class="checkboxc" type="checkbox" name=campos[] id="3" value="dispositivos.AsignadoA as responsable"> Responsable de aplicacion
                                        </label> 
                                        <label class="checkbox">
                                            <input class="checkboxc" type="checkbox" name=campos[] id="3" value="clientes.Nombre as cliente"> Cliente
                                        </label> 
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="modal-footer">
                            <div id="error" class="alert alert-error" style="visibility: hidden; display: inline;">
                                            <strong>Error!</strong>
                                            subir imagen menor 200px x 200px de temaño.
                                        </div>
                            <button class="btn" data-dismiss="modal"  type="button" value="Cerrar" >Cerrar</button>
                            <button class="btn btn-primary" type="submit" onclick="validarconfiguracion();" value="Guardar">Guardar</button>
                         </div>
                    </form>
            </div>
          </div>
        </div><!--/Modal Encabezado pdf-->   

   
